package com.aaa.service.impl;

import com.aaa.dao.EmpMapper;
import com.aaa.entity.Emp;
import com.aaa.service.EmpService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;
import java.util.Map;
@Service
public class EmpServiceImpl extends ServiceImpl<EmpMapper, Emp> implements EmpService {
    @Resource
    EmpMapper empMapper;
    @Override
    public Map<String, Object> login(String eusername, String epassword) {
        List<Map<String,Object>> list=empMapper.login(eusername,epassword);
        if (list.size()==1){
            return list.get(0);
        }else {
            return null;
        }
    }

    @Override
    public List<Emp> select(Integer eid) {
        return empMapper.select(eid);
    }

    @Override
    public List<Emp> select2() {
        return empMapper.select2();
    }

    @Override
    public List<Emp> select3(String eusername) {
        return empMapper.select3(eusername);
    }
}
